public class Student implements Comparable <Student>{
    private  String stuNo;
    private  String stuName;

    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }
    public void setStuName(String stuName) {
        this.stuName = stuName;
    }
    public Student(){

    }
    public Student(String stuNo, String stuName) {
        super();
        this.stuNo = stuNo;
        this.stuName = stuName;
    }

    @Override
    public int compareTo(Student student)
    {
        int low = this.stuNo.compareTo(student.stuNo);
        return low == 0?this.stuName.compareTo(student.stuName) : low;
    }

    @Override
    public String toString() {
        return "学生[学号：" +stuNo +  ", 姓名：" + stuName +"]";
    }
}